import Sprite from '../base/Sprite'
import DataStore from '../base/DataStore'

export default class Pencil extends Sprite {

  constructor(image, top) {
    const dataStore = DataStore.getInstance()
    super(
      image,
      0,
      0,
      image.width,
      image.height,
      dataStore.screenWidth,
      0,
      image.width,
      image.height
    )
    this.top = top
  }

  draw() {
    this.x = this.x - this.dataStore.landSpeed
    super.draw(
      this.image,
      0,
      0,
      this.width,
      this.height,
      this.x,
      this.y,
      this.width,
      this.height,
    )
  }
}